<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>

<html>



<head>

    <meta charset="utf-8"/>

    <title>订单管理</title>

    <link rel="stylesheet" href="/Public/Leader/css/bootstrap.css">

    <link rel="stylesheet" type="text/css" href="/Public/Leader/css/index.css"/>

    <link rel="stylesheet" type="text/css" href="/Public/Leader/css/bootstrap-datetimepicker.css"/>    

    <style type="text/css">

        .order-list a {

            position: relative;

        }



        .order-list span {

            float: right;

            margin-right: 20px;

        }



        .trhead td {

            background: #efefef;

            text-align: center

        }



        .trbody td {

            text-align: center;

            vertical-align: top;

            border-left: 1px solid #f2f2f2;

            overflow: hidden;

            font-size: 12px;

        }



        .trorder {

            background: #f8f8f8;

            border: 1px solid #f2f2f2;

            text-align: left;

        }



        .ops {

            border-right: 1px solid #f2f2f2;

            text-align: center;

        }



        .pagination ul {

            display: inline-block;

            margin-left: 0;

            margin-bottom: 0;

            -webkit-border-radius: 3px;

            -moz-border-radius: 3px;

            border-radius: 3px;

            font-size:0;

        }



        .pagination ul > li {

            display: inline-block;

            font-size:14px;

            border:1px solid #ddd;

        }

        .pagination ul > *:not(:first-child){

            margin-left:-1px;

        }

        .pagination ul > span{

            border:1px solid #ddd;

        }

        .pagination ul > li > a, .pagination ul > span {

            /*float: left;*/

            display:inline-block;

            padding: 0 14px;

            line-height: 38px;

            text-decoration: none;

            background-color: #ffffff;

            font-size:14px;

        }

        .pagination ul > li:last-child{

            margin-left:15px;

            border:none;

        }

        .pagination ul > li:last-child #pages{

            margin:0 6px;

        }

        thead tr th {

            text-align: center;

        }

    </style>

</head>

<body>

<style>
    .pagination .current{
        float: left;
    padding: 0 14px;
    line-height: 38px;
    text-decoration: none; 
    border-left-width: 0;
    }
        
</style>
<div id="topbar" class="top-navigation dark-bg ">
            <nav class="navbar   dark-bg " role="navigation" style="width:85%;margin:auto;">
                <div class="navbar-header" style="width:200px;">
                    <button aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" class="navbar-toggle collapsed" type="button">
                        <i class="fa fa-reorder"></i>
                    </button>
                    <a class="navbar-brand" href="<?php echo U('Index/index');?>">小易出行</a>
                </div>
                <div class="navbar-collapse collapse" id="navbar">
                    <ul class="nav navbar-nav dark-bg">
                        

                        <li <?php if($table == 'index'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Index/index');?>"> 首页</a>
                        </li>

                        <li <?php if($table == 'order'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Order/orderadmin');?>">订单管理</a>
                        </li>

                        <li <?php if($table == 'pay'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Pay/paycount');?>">交易中心</a>
                        </li>
                        <li <?php if($table == 'article'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Article/lst');?>">文章</a>
                        </li>
                        <li <?php if($table == 'wx'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Wx/wx_menu/wid/1');?>">微信管理</a>
                        </li>
                        <li <?php if($table == 'line'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Line/lineadmin');?>">线路管理</a>
                        </li>
                        <li <?php if($table == 'user'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('User/userinfo');?>">用户管理</a>
                        </li>
                        <li <?php if($table == 'useradmin'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Useradmin/userinfo');?>">系统管理</a>
                        </li>

                    </ul>
                    <ul class="nav navbar-top-links navbar-right">
                        <li class="dropdown">
                            <a aria-expanded="false" role="button" href="#" class="dropdown-toggle" data-toggle="dropdown" style="position:relative;" onclick="$(this).find('span').toggleClass('deg180')">
                                <name style="width: 80px;white-space:nowrap;overflow:hidden;text-overflow: ellipsis;display: block;text-align: center"><?php echo session('username');?></name>
                                <span class="caret" style="position: absolute;top: 22px;right: 12px;"></span></a>
                            <ul role="menu" class="dropdown-menu">
                                <li>
                                    <a onclick="return confirm('您确定要退出吗？')" tabindex="-1" href="<?php echo U('Login/Logout');?>">退出</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </nav>
        </div>

<div class="wrapper main-wrapper wrapper-content ">

    <div class="page-menubar">
    <div class="menu-header">订单管理</div>
    <ul class="order-list">
        <li
        <?php if(($datas['statu']) == "5"): ?>class="active"<?php endif; ?>
        >
        <a href="<?php echo U('Order/orderadmin',array('statu'=>5));?>">待支付 <span class="status0"></span></a>
        </li>
        <li
        <?php if(($datas['statu']) == "6"): ?>class="active"<?php endif; ?>
        >
        <a href="<?php echo U('Order/orderadmin',array('statu'=>6));?>">已完成 <span class="status0"></span></a>
    </li>


<!--<li-->
<!--<?php if(($_GET['statu']) == "2"): ?>class="active"<?php endif; ?>-->
<!--&gt;-->
<!--<a href="<?php echo U('Order/orderadmin',array('statu'=>2));?>">未完成 <span class="text-danger status1"></span></a>-->
<!--</li>-->

<li
<?php if(($_GET['statu']) == "5"): ?>class="active"<?php endif; ?>
>
<!--<a href="<?php echo U('Order/orderadmin',array('statu'=>5,'order_cwstatus'=>2));?>">全部订单 <span class="status0"></span></a>-->
</li>

<li
    <?php if(($datas['open_status']) == "1"): ?>class="active"<?php endif; ?>
    >
    <a href="<?php echo U('Order/orderadmin',array('open_status'=>1));?>">派单列表 <span class="status0"></span></a>
</li>

<li
    <?php if(($open_status) == "2"): ?>class="active"<?php endif; ?>
    >
    <a href="<?php echo U('Order/addOrder',array('open_status'=>2));?>">新建订单 <span class="status0"></span></a>
</li>


<li <?php if(($_GET['statu']) == ""): if(($datas['open_status'] != 1) and ($datas['open_status'] != 2) and ($datas['open_status'] != '') and ($datas['res'] != 1)): ?>class="active"<?php endif; endif; ?>>

<a href="<?php echo U('Order/orderadmin');?>">全部订单<span class="all"></span></a>
</li>


<li <?php if(($res) == "1"): ?>class="active"<?php endif; ?>>
<a href="<?php echo U('Order/withdraw');?>">提现列表<span class="all"></span></a>
</li>

</ul>
</div>

    <!--主要内容-->

    <div class="page-content" style="display: block;">

        <div class="page-heading" style="position:relative;">

            <h2>提现列表</h2>

        </div>





        <div class="panel panel-default" style="margin-top: 20px;">

            <div class="panel-body" style="text-align: center;">

                <table class="table table-responsive">

                    <thead>

                    <tr style="background:#f9f9f9;">

                        <th style="text-align: center;">#</th>

                        <th style="text-align: center;">司机姓名</th>

                        <th style="text-align: center;">到账手机号</th>

                        <th style="text-align: center;">提现金额</th>

                        <th style="text-align: center;">提现卡号</th>

                        <th style="text-align: center;">提现时间</th>

                        <th style="text-align: center;">扣款比例</th>

                        <th style="text-align: center;">提现状态</th>

                        <th style="text-align: center;">操作</th>

                    </tr>

                    </thead>

                    <tbody>

                    <?php if(is_array($withdraw)): $i = 0; $__LIST__ = $withdraw;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>

                            <td><?php echo ($vo["id"]); ?></td>
                            <td><?php echo (uidname($vo["uid"])); ?></td>

                            <td><?php echo ($vo["name"]); ?></td>

                            <td><?php echo ($vo["money"]); ?></td>

                            <td><?php echo ($vo["card"]); ?></td>

                            <td><?php echo (date("Y-m-d H:i:s",$vo["create_time"])); ?></td>
                            
                            <td><?php echo ($vo["ratio"]); ?>%</td>

                            <td>

                                <?php if($vo['status'] == 1): ?>待审核

                                    <?php elseif($vo['status'] == 2): ?>审核通过

                                    <?php elseif($vo['status'] == 3): ?>审核不通过

                                    <?php else: ?>审核状态错误<?php endif; ?>

                            </td>

                            <td>
                            
                            
                            

                                <?php if($vo['status'] == 1): ?><a href="<?php echo U('Order/allOrder',array('id'=>$vo['id']));?>">
                                        <i class="glyphicon glyphicon-eye-open"></i></a>
                                    <a href="javascript:void(0);" id="checkflag" class="checkflag" data-url="<?php echo U('Order/checkflag',array('id'=>$vo['id']));?>">审核</a>

                                    <?php elseif($vo['status'] == 2): ?>
                                    <a href="<?php echo U('Order/allOrder',array('id'=>$vo['id']));?>">
                                        <i class="glyphicon glyphicon-eye-open"></i></a>
                                    审核已经通过

                                    <?php elseif($vo['status'] == 3): ?>
                                    审核未通过
                                    <?php else: endif; ?>

                                

                            </td>

                        </tr><?php endforeach; endif; else: echo "" ;endif; ?>

                    </tbody>

                </table>

                <?php echo ($page); ?>

            </div>

        </div>

    </div>

</div>

<script src="/Public/Leader/js/jquery.js" type="text/javascript" charset="utf-8"></script>

<script src="/Public/layer/layer.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript">

    //司机的详细信息

    $(".checkflag").on("click", function () {

        var data_url = $(this).attr("data-url");
       
        layer.open({

            type: 2,

            title: '司机提现审核',

            shadeClose: true,

            shade: 0.8,

            area: ['90%', '80%'],

            content: data_url, //iframe的url

            end: function () {

				location.reload();

			}

        });

    });

</script>

</body>

</html>